import request from '@/utils/request';

/** 导出handbookRecord接口


  import  { postHandbookRecordAdd,postHandbookRecordPage,postSubmit,postUpdate,deleteHandbookRecord } from "@/api/handbookRecord/index"


  */

/**
手册记录新增
* @param { string } classification - 分类 ( required: true )
* @param { integer } deptId - 科室编号 ( required: true )
* @param { integer } postId - 岗位编号 ( required: true )
* @param { integer } templateId - 模板编号 ( required: true )
* @param { string } title - 标题 ( required: true )
* @param { integer } type - 记录类型 ( required: true )
*/
export const postHandbookRecordAdd = (data) => {
  return request({
    url: '/handbookRecord/add',
    method: 'post',
    data: data,
  });
};

/**
手册记录分页列表
* @param { string } classification - 分类 ( required: true )
* @param { integer } createBy - 创建人id ( required: true )
* @param { boolean } createMe - 创建人时间 ( required: true )
* @param {  } createTime - 创建时间 ( required: true )
* @param { integer } deptId - 科室编号 ( required: true )
* @param { integer } postId - 岗位编号 ( required: true )
* @param { integer } state - 状态 ( required: true )
* @param { string } title - 标题 ( required: true )
* @param { integer } type - 记录类型 ( required: true )
*/
export const postHandbookRecordPage = (data) => {
  return request({
    url: '/handbookRecord/list',
    method: 'post',
    data: data,
  });
};

/**
提交
* @param {  } documentDto - 修改表单内容 ( required: true )
* @param { integer } id - id ( required: true )
*/
export const postSubmit = (data) => {
  return request({
    url: '/handbookRecord/submit',
    method: 'post',
    data: data,
  });
};

/**
手册记录修改
* @param { string } classification - 分类 ( required: true )
* @param { integer } id - id ( required: true )
* @param { string } title - 标题 ( required: true )
* @param { integer } type - 记录类型 ( required: true )
*/
export const postUpdate = (data) => {
  return request({
    url: '/handbookRecord/update',
    method: 'post',
    data: data,
  });
};

/**
手册记录删除
* @param { integer } id - id ( required: true )
*/
export const deleteHandbookRecord = (params) => {
  return request({
    url: `/handbookRecord/${params.id}`,
    method: 'delete',
    params: params,
  });
};
